home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / SCRIPTZ / REMCLONE.ZIP / REMCLONE.TXT
Text File  |  1997-01-11  |  8KB  |  111 lines

  1. _.╖┤»`╖.╕DScript⌐  by DonDon '96-'97╕.╖┤»`╖.╕_
  2.           This Version RUNs on MIRC ver 4.7 ! 
  3.           IF ya don't have it , get it ... 
  4.        Visit my homepage at http://www.cinternet.net/~don
  5.     All code By DonDon DScript⌐ , if ya don't at least mention me , Well ya will Pay =)
  6.  
  7. *** Clone Killer from DonDon ! ***
  8. This Script includes a ton more than a simple , Powerful Clone Scanner.
  9. 1.) It includes an "on join" clone kick/ban that allows you to set the max clones for ops and nooops separately 
  10.     and a //cc Channel Clone Scanner.  
  11. 2.) Check out my notes on the "math" aliases i have included in this script,
  12.     I think you will like the  
  13. 3.) Notes Not to forget , This Clone Script relys on the IAL internal address list of mIRC
  14.     if you are not sure what that is type /ial , it SHOULD say Ial is ON , If not type /ial on , then part and rejoin the
  15.     channel you wish to Clone Protect.
  16.  
  17. *** Description of Aliases i have included , These are used by various parts of my script ***
  18.  
  19. ; "Isme" aliases is an identier for checking for you and clones of you, ie if ($isme($nick) = true) { then $nick is from the same port and domain you are }
  20. ; "isBot" aliases is an identifier for checking for X and W , ie if ($isbot(W) = true) { then W = #cservice channel Bot } 
  21. ; "dl" aliases  is an identier for checking A user level , ie //echo 4 -a $dl($me) >> will return YOUR user level !
  22. ; "cc" aliases is a very fast Clone Scanner aliases type //cc # in any channel window for a quick Scan 
  23. ; *** Note *** with "cc" the %active variable can be used to send the scan info anywhere ya wish. 
  24. ; "MATH" aliases is a "VERY POWERFUL" $identifier which includes:
  25. ; A Percent, Dollar, Byte, Kilobyte, Add , Subtract, Divide, Multiply, Power, and number convertor
  26. ; Add = $math(num1,num2,+)       Adds num1 to num2 , and returns result 
  27. ; Subtract = $math(num1,num2,-)   Subtracts num2 from num1 , and returns result 
  28. ; Divide = $math(num1,num2,-)     Divides num1 by num2 , returns "ROUNDED" result
  29. ; Multiply = $math(num1,num2,*)   Multiplies num1 and num2 , returns result
  30. ; Percent = $math(num1,num2,p)    Figures what Percent num1 is of num2 , Rounded of course.
  31. ; Power = $math(num1,num2,^)      Returns num1 to the power of num2 
  32. ; Byte = $math(num1,b)            Returns the Comma'd byte result of num1 , $math(1000,b) returns 1,000 bytes
  33. ; Kilobytes = $math(num1,k)       Returns the Comma'd Kilobyte result of num1 , $math(1000,k) returns 1.0 Kilobytes
  34. ; Dollar = $math(num1,$)      Returns the Comma'd Dollar format of num1 , $math(1121290.01,$) returns $1,121,290.01
  35. ; Number = $math(num1,th)         Returns the Counted result of num1 , $math(1,th) - returns 1st , $math(23,th) - returns 23rd 
  36. ; try any of these like this 
  37. ; type this //echo 4 -a $math(1,1,+) 
  38. ; the result is an echo to the active window in red the number 2 , since + was used it added 1 + 1 = 2 
  39.  
  40. Copy and paste these to  "Channel POPups" 
  41.  
  42. DonDon's CloneCheck
  43. .On:set %cloneCheck ON | echo 4 -a CloneCheck is now %clonecheck | set %protect $$?="Enter Channels to Protect , #mirc-scripts,#fun ?" | echo 4 -a Channels Protected are %protect 
  44. .OFF:set %cloneCheck OFF | echo 4 -a CloneProtect is now %clonecheck
  45. .Max Op Clones:/set %c.ops $$?="Max Clones for ops is [ %c.ops ] , New Value?"
  46. .Max NopOp Clones:/set %c.nor $$?="Max Clones for ops is [ %c.nor ] , New Value?"
  47. .Ban Status:/set %c.ban $$?="Ban on Excess Clones is [ %c.ban ] , New Value?"
  48. .Kick Status:/set %c.rem $$?="Kick on Excess Clones is [ %c.rem ] , New Value?"
  49.  
  50.  
  51. Copy and Paste these remote/events
  52.  
  53. 1:ON JOIN:%protect: {  
  54.   if ($nick = $me) { who $chan | Echo 6 -a Updating Ial for -= $+ $chan $+ =- |  halt } 
  55.   if ($isbot($nick) = true) { halt }
  56.   if ($isme($nick) = true) { notice $nick Hey There Boss! , Welcome to $chan | halt }
  57.   :clone | if (%clonecheck != ON) { goto end }
  58.   %nx = 1 | %qc = $chr(32) | %nc = $ial($wildsite,0) | If (%nc = 0) { echo 4 -a Error Reading IAL on $site | halt }
  59.   :up | if [ $ial($wildsite,%nx).nick ] ison $chan { %qc = %qc $ial($wildsite,%nx).nick , | inc %clns | inc %nx | goto up } 
  60.   %qc = $remove(%qc,$chr(32))
  61.   if ($dl($nick) < 100) { %c.max = %c.nor } | else { %c.max = %c.ops } 
  62.   if (%Clns < %c.max) { goto end }
  63.   if (%Clns = %c.max) { if (%c.max = 1 ) { halt } | notice $chan %qc  are %clns Connect(s) from $site and on $chan -=Max Connects: $+ %c.max $+ =- | goto other }
  64.   if (%clns > %c.max)  {
  65.     if ($me isop $chan) {
  66.       if (%c.ban = on) { if ($isme($nick) = false) { ban -u30 $chan $nick 4 } }
  67.       if (%c.rem = on) { 
  68.         %num = 1 | :Kick | if (%num <= %Clns) { set %nick $gettok(%qc,%num,44) | if ($isme(%nick) = false)  { kick $chan %nick  -=Clone Number %num $+ =- out of %clns $+ , $a.kick(clone) Clones Removed by $dsc } | inc %num | goto Kick }
  69.         goto end
  70.       }
  71.     } 
  72.     else { notice $chan %qc are %clns Clones from $site and on $chan Get Them! | goto end }
  73.   }
  74.   :end | unset %nx %num %nick %qc %nc %clns  | halt
  75. }  
  76.  
  77.  
  78.  
  79. Copy and Paste these to Aliases
  80.  
  81. isme { if (($1 = $me) || ($address($1,2) = $address($me,2))) { return true  } | else { return false } }
  82. isbot { if (($$1 = W) || ($$1 = X) && (cservice@undernet.org isin $address($$1,1))) { return true } | else { return false } }
  83. dl  { if ($level($address($1,0)) = $null) { return null } | return $remove($level($address($1,0)),$chr(44)) }
  84. dsc { return Brought to you by DScript⌐ by DonDon }
  85. cc { 
  86.   set %timein $ctime | if ($1 = $null) { halt } | if (%active = $null)  { set %active echo 5 -a }
  87.   %active DonDon CloneFinder is Scan'n  -= $+ $1 $+ =- for Clon'z
  88.   %ops = $math($opnick(0,$1),$nick(0,$1),r) | %nops = $math($nopnick(0,$1),$nick(0,$1),r) | %total = %ops + %nops | if (%total = 99) { %nops = %nops $+ .5 | %ops = %ops $+ .5 }
  89.   %nix = 1 | %qc = $chr(32)  | %na = $chr(32) | %sites = $chr(32)
  90.   :next | %nx = 1 | %nn = $nick(%nix,$1) | if (%nn = $null) { goto report } |  %na = *!*@* $+ $gettok($address(%nn,1),2,64)
  91.   :up | if [ $ial(%na,%nx).nick ] ison $1 { %qc = %qc $ial(%na,%nx).nick , | inc %nx | goto up } 
  92.   %qc = $remove(%qc,$chr(32)) | if ($gettok(%qc,0,44) > 1) { if (%na !isin %sites) { inc %clns 1 | inc %clnss 2 | %sites = %sites %na  | %active %qc are the 4 $math(%clns,th) $+  Set of clones from %na and on $1 right now } }
  93.   inc %nix 1 | unset %na %qc %nc | goto next
  94.   :report | %clnsss = $math(%clns,$nick(0,$1),r) |  %active 2 Total Nicks: $+ $nick(0,$1)  $+ , $+ 4 Total Clones: $+ %clns ~~  %clnsss $+ $chr(37)  $+ , $+ 3 Ops: $+ $opnick(0,$1) ~~ %ops  $+ . $+  Nops: $+ $nopnick(0,$1) ~~ %nops $+ $chr(37) | %total = [ $ctime - %timein ] | %active Total Process time %total secs 
  95.   :end | unset %clns %clnss %clnsss %na %nc %nx %nix %timein %total %ops %nops %qc %sites | halt
  96. }
  97. math {  
  98.   if ($3 = $null) { goto $2 } | else { goto $3 } 
  99.   :+ | %a = $1 + $2 | return %a 
  100.   :- |  %a = $1 - $2 | return %a 
  101.   :/  | %a = $1 / $2 | return %a 
  102.   :^ | %a = $1 ^ $2 | return %a 
  103.   :* | %a = $1 * $2 | return %a 
  104.   :$ | %dol = $token(1,46,$1) | %i = $len(%dol) | %ix = %i / 3 | %ix1 = %ix * 3 | %r = %i - %ix1 | %c = 1 | if (%r = 0) { %d = $chr(36) } | else { %d = $chr(36) $+ $left(%r,%dol) $+ , | inc %c %r }  | :dol | if ($mid(%c,3,%dol) != $null) { %d = %d $+ $mid(%c,3,%dol) $+ , | inc %c 3 | goto dol } | %i = $len(%d) | dec %i 1 | %d = $mid(1,%i,%d) | if ($token(2,46,$1) = $null) { %d = %d $+ .00 } | else { %d = %d $+ . $+ $+ $token(2,46,$1) } | return %d
  105.   :p  | %a = $1 | %t = $2 | %a1 = %a * 100 | %a2 = %a1 / %t | return  %a2
  106.   :b |  %dol = $1 | %i = $len(%dol) | %ix = %i / 3 | %ix1 = %ix * 3 | %r = %i - %ix1 | %c = 1 | if (%r = 0) { %d = $chr(32) } | else { %d = $left(%r,%dol) $+ , | inc %c %r } | :by | if ($mid(%c,3,%dol) != $null) { %d = %d $+ $mid(%c,3,%dol) $+ , | inc %c 3 | goto by } | %i = $len(%d) | dec %i 1 | %d = $mid(1,%i,%d) | return $remove(%d,$chr(32)) bytes
  107.   :k | %dol = $1 | %k = %dol / 1000 | %k1 = %k * 1000 | %r = %dol - %k1 | if ($len(%r) < 2) { %r = 00 $+ %r } |  %total = %k $+ . $+ %r | return %total Kilobytes
  108.   :th | %len = $len($1) | if ($mid(%len,1,$1) = 1) { return $1 $+ st } |  if ($mid(%len,1,$1) = 2) { return $1 $+ nd } |  if ($mid(%len,1,$1) = 3) { return $1 $+ rd }  | return $1 $+ th
  109. }
  110.